<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>角色列表——后台管理</title>
    <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_PUC;?>/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_PUC;?>/css/main.css"/>
    <script type="text/javascript" src="<?php echo ADMIN_PUC;?>/js/libs/modernizr.min.js"></script>
    <script type="text/javascript" src="<?php echo ADMIN_PUC;?>/js/jquery-1.4.2.min.js"></script>
</head>
<body>
<include file="Common/top" /> 
<div class="container clearfix">
    <div class="sidebar-wrap">
        <div class="sidebar-title">
            <h1>菜单</h1>
        </div>
        <include file="Common/left" />
    <!--/sidebar-->
    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="/jscss/admin">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">角色管理</span></div>
        </div>
        <div class="search-wrap">
            <div class="search-content">
                <form action="/jscss/admin/design/index" method="post">
                    <table class="search-tab">
                        <tr>
                            <th width="120">选择分类:</th>
                            <td>
                                <select name="search-sort" id="">
                                    <option value="">全部</option>
                                    <option value="19">精品界面</option><option value="20">推荐界面</option>
                                </select>
                            </td>
                            <th width="70">关键字:</th>
                            <td><input class="common-text" placeholder="关键字" name="keywords" value="" id="" type="text"></td>
                            <td><input class="btn btn-primary btn2" name="sub" value="查询" type="submit"></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                <div class="result-title">
                    <div class="result-list">
                        <a href="__CONTROLLER__/add" class="btn btn-primary btn2"><i class="icon-font"></i>新增角色</a>
                        <a id="batchDel" href="javascript:void(0)"><i class="icon-font"></i><input form="myform" formaction="__CONTROLLER__/bdel" type="submit" class="btn btn-primary btn2" value="批量删除" /></a>
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <th class="tc" width="5%"><input class="allChoose" name="" id='check' type="checkbox"></th>
                            <th>ID</th>
                            <th>角色名称</th>
                            <th>角色权限</th>
                            <th>操作</th>
                        </tr>
                        <volist name="list" id="vo">
                        <tr>
                            
                            <td class="tc">
                            <if condition="$vo['id'] neq 1">
                            <input name="ids[]" value="{$vo.id}" class="check" type="checkbox">
                            </if>
                            </td>
                            
                            <td>{$vo.id}</td>
                            <td>{$vo.rolename}</td>
                            <td>
                            <if condition="$vo['pri_id_list'] eq '*'">所有权限
                            <else />
                            {$vo.pri_name}
                            </if>
                            </td>
                            <td>
                                <a class="link-update" href="__CONTROLLER__/edit/id/{$vo.id}">修改</a>
                               <if condition="$vo['id'] neq 1">
                                <a class="link-del" onclick="return confirm('确定删除此角色吗？');" href="__CONTROLLER__/del/id/{$vo.id}">删除</a>
                                </if>
                            </td>
                        </tr>
                        </volist>
                    </table>
                    <div class="list-page"><div>{$page}</div></div>
                </div>
            </form>
        </div>
    </div>
    <!--/main-->
</div>
</body>
</html>
<script type="text/javascript">
    $("#check").click(function(){
        if($(this).attr("checked"))
        {
            $(".check").attr("checked","checked")
        }else
        {
            $(".check").removeAttr("checked")
        }
    })
</script>